﻿@model OASys.Web.Areas.ModuleSys.Models.ModelWorkDayDateDiffIndex

@{
    ViewBag.Title = "系统工作日设定";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script type="text/javascript">
    /*系统工作日设定
    -----------------------------------------*/
    function sysWorkDaysSetting(date) {
        window.top.openDialog({ Url: "/ModuleSys/WorkDayDateDiff/Create/?Date=" + date + "&PageState=" + detail, Title: "系统工作日设定", Width: 1000, Height: 650 });
    }
</script>

<!--右边内容页-->
<div>
    @using (Html.BeginForm())
    {
        /*工具栏
        --------------------------------------------------*/
        <div class="toolbar">
            <div class="toolbar-left">
                @Html.Button(ButtonType.新增, "sysWorkDaysSetting('" + @DateTime.Now + "')")
            </div>
            <div class="toolbar-right">
				@Html.TextBoxFor(x => x.SearchEntity._CommonSearchCondition, new {@Id="txtClander",@class = "common-search-condition" })
				<input type="submit" class="common-search-submit" value="" />
			</div>
        </div>
        
        /*说明文字
        --------------------------------------------------*/
        <div class="search-clue">
            您可通过该功能，查看并维护每月的工作日信息
        </div>
        /*表格数据显示
        --------------------------------------------------*/        
        <div class="common-table-container">
            <table class="common-table" id="common-table">
                <colgroup>
                    <col width="150" />
                    <col width="150" />
                    <col width="150" />
                    <col width="150" />
                </colgroup>
                <thead>
                    <tr>
                        @Html.HiddenFor(x => x.SearchEntity._OrderName, new { data_order_name = "" })
                        @Html.HiddenFor(x => x.SearchEntity._OrderDirection, new { data_order_direction = "" })
                        @(Html.ThOrderHelper<OASys.Entity.UVSysWorkDaysSetting>(x => x.YearMonth, "年月"))
                        @(Html.ThOrderHelper<OASys.Entity.UVSysWorkDaysSetting>(x => x.MonthDays, "天数"))
                        @(Html.ThOrderHelper<OASys.Entity.UVSysWorkDaysSetting>(x => x.WorkDays, "工作日(天)"))
                        @(Html.ThOrderHelper<OASys.Entity.UVSysWorkDaysSetting>(x => x.Holidays, "休息日(天)"))
                    </tr>
                </thead>
                <tbody>
                        @foreach (var item in Model.UVSysWorkDaysSettingCollection)
                        {
                        <tr ondblclick="sysWorkDaysSetting('@(item.YearMonth)-1')">
							<td>
								@item.YearMonth
							</td>
							<td>
								@item.MonthDays
							</td>
							<td>
								@item.WorkDays
							</td>
							<td>
								@item.Holidays
							</td>
						</tr> 
                        }
                </tbody>
            </table>
        </div>
        <!--分页显示-->
		<div>
			@{
                    Html.RenderPartial("/Views/Controls/Paginate.cshtml", Model.PaginateHelperObject);
			}
		</div>        
    }
</div>
